package com.tempjob.common.businesss.mongo.entity;

import com.anwen.mongo.annotation.ID;
import com.anwen.mongo.annotation.collection.CollectionField;
import com.anwen.mongo.annotation.collection.CollectionName;
import com.anwen.mongo.enums.FieldFill;
import com.anwen.mongo.enums.IdTypeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.Version;

import java.util.Date;

/**
 * 行业分类
 *
 * @author hui
 * @Date 2024/11/4 15:58
 **/
@CollectionName(value = "industry_category")
@Data
public class IndustryCategory {

    @ID(type = IdTypeEnum.OBJECT_ID)
    @CollectionField("_id")
    @ApiModelProperty("id")
    private String id;

    @CollectionField("category_type")
    @ApiModelProperty("类型:1全职2零工")
    private Integer categoryType;

    @CollectionField("category_name")
    @ApiModelProperty("分类")
    private String categoryName;


    @CollectionField(value = "oper_time", fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "更新时间", hidden = true)
    private Date operTime;

    @CollectionField(value = "oper_id", fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "更新人id", hidden = true)
    private Long operId;

    @CollectionField(value = "oper_name", fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "更新人", hidden = true)
    private String operName;

    @CollectionField(value = "create_id", fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建人id", hidden = true)
    private Long createId;

    @CollectionField(value = "create_name", fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建人", hidden = true)
    private String createName;

    @CollectionField(value = "create_time", fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间", hidden = true)
    private Date createTime;

    @Version
    @CollectionField("version")
    @ApiModelProperty(value = "乐观锁", hidden = true)
    private Integer version;

}
